package com.reactive.springbootreactive.entity;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

@Data
public class Authority implements GrantedAuthority {

    private AuthorityEnum authorityName;


    @Override
    public String getAuthority() {

        return authorityName.name();
    }

    public Authority() {
    }

    public Authority(AuthorityEnum authorityName) {
        this.authorityName = authorityName;
    }
    public enum AuthorityEnum {
        COMMON, VIP, SUPER_VIP
    }
}